package cn.unknowpupil.common.mybatis.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import cn.unknowpupil.common.mybatis.IBaseEnum;
import lombok.Getter;

/**
 * @Classname: StateEnum
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/1/16 12:27
 * @Description:
 * @Version: 1.0
 */
@Getter
public enum StateEnum implements IBaseEnum<String> {

    ACTIVE(0+"", "正常"),
    SHUTDOWN(2+"", "宕机"),
    INACTIVE(1+"", "禁用");
    @EnumValue
    private final String status;
    @JsonValue
    private final String description;
    @JsonCreator
    StateEnum(String status, String descption) {
        this.status = status;
        this.description = descption;

    }

    @Override
    public String getValue() {
        return status;
    }

    @Override
    public String getDescription() {
        return description;
    }
}